import { TComponent } from '@material/typeing';
import KImage from '../image';
import $style from './index.scss';
import { FC } from 'react';

export interface EmptyProps extends TComponent {
    src?: string;
    size?: number | string;
    width?: string | number;
    height?: string | number;
    description?: string;
    action?: string;
}
const Empty: FC<EmptyProps> = function (props) {
    const { size = 30, src = '', width, height, description = '内容加载失败，请稍后再试' } = props;
    return (
        <div className={$style.empty}>
            <KImage
                className={$style.image}
                size={size}
                height={height}
                width={width}
                src={src}
            ></KImage>
            <div className={$style.description}>{description}</div>
        </div>
    );
};

export default Empty;
